package com.wanczy.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wanczy.pojo.UserTable;
import com.wanczy.service.UserSingleService;
import com.wanczy.service.impl.UserSingleServiceImpl;

@WebServlet("/servlet/updateSingleQuery")
public class UpdateSingleQuery extends HttpServlet {
	private static final long serialVersionUID = 1L;
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		UserTable userTable = (UserTable) request.getSession().getAttribute("userTable");
		UserSingleService service = new UserSingleServiceImpl();		
		UserTable userTable1 = service.findById(userTable.getUser_id());
		request.setAttribute("userTable1",userTable1);
		request.getRequestDispatcher("/jsp/userManager/updUserSingle.jsp").forward(request, response);
	}
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
